package com.liuanbang.saro.sarodemo.util;

import java.math.BigDecimal;

/**
 * 数学运算工具
 */
public class MathUtil {

    //获取百分比数值，格式为0.xxx
    public static BigDecimal getPercentBy3(long currentNumber, long totalNumer) {
        return new BigDecimal((double) currentNumber).divide(new BigDecimal((double) totalNumer), 3, BigDecimal.ROUND_HALF_UP);
    }
}
